<div class="col-md-12">
    <table class="table table-hover">
        <thead>
        <tr>
            <th>#</th>
            <?php foreach ($s as $row):?>
            <th><?php echo $row['web_name'];?></th>
            <?php endforeach;?>
        </tr>
        </thead>
        <tbody>
        <?php foreach ($q as  $k => $item) :?>
            <tr>
                <th><?php echo $k;?></th>
                <?php foreach ($item as $cc):?>
                <td><?php echo $cc['c'];?></td>
                <?php endforeach;?>
            </tr>
        <?php endforeach;?>
        </tbody>
    </table>
</div>